package com.java.oop.work.sj1.no1;

import java.util.HashMap;
import java.util.Map;

public class Library {

    private Map<String,Book> map = new HashMap<>();


    public void addBook(Book book){
        map.put(book.getName(), book);
    }

    public Map<String,Book> queryMap(){
        return map;
    }

    public Book getBookByName(String name){
        return map.get(name);
    }

    public void removeBook(String name){
        map.remove(name);
    }

}
